<?php
namespace App\Http\Controllers\ApiApp;

use App\DBs\MoreFileDB;
use Illuminate\Http\Request;

class MoreFileController extends BaseController
{
    /**
     *
     */

    protected $db;

    public function __construct()
    {
        parent::__construct();
        $this->db = new MoreFileDB();
    }

    /**
     * 列表
     */
    public function getIndex(Request $request)
    {
//        $token = $request->post('token','');
//        $adminId = $this->getAdminByToken($token);
//        if (!$adminId) {
//            return $this->toAppJson(-2);
//        }
        $moreId = $request->post('moreId',0);
        $resDb = $this->db->getIndex($moreId);
        if ($resDb['code']!=0) {
            return $this->toAppJson(-4);
        }
        $dataArr = $resDb['data'];
        return $this->toAppJson(0,$dataArr);
    }
}